package com.cmc.cloud.cmclink.doc.api.document.req.so;

import com.cmes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.time.LocalDate;
import java.util.List;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * @author lzp
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SoPageReqDto extends PageParam {

    @Schema(description = "doc_so表主键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long id;

    @Schema(description = "数据来源")
    private String dataSource;

    @Schema(description = "创建人不允许为空")
    private List<String> creators;

    @Schema(description = "订舱号")
    private String bookingNo;

    @Schema(description = "客户参考号")
    private String referenceNo;

    @Schema(description = "订舱船名 line 第一段")
    private String bookingVessel;

    @Schema(description = "订舱航次 line 第一段")
    private String bookingVoyage;

    @Schema(description = "接货地")
    private String porCode;

    @Schema(description = "装货港")
    private String polCode;

    @Schema(description = "卸货港")
    private String podCode;

    @Schema(description = "目的地")
    private String delCode;

    @Schema(description = "订舱状态", example = "2")
    private String soStatus;

    @Schema(description = "订舱时间 Start")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate bookingTimeStart;

    @Schema(description = "订舱时间 End")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate bookingTimeEnd;

    @Schema(description = "货类")
    private String cargoType;

    @Schema(description = "货类子类")
    private String subCargoType;

    @Schema(description = "品名code")
    private String hsCode;

    @Schema(description = "预计开航时间 Start")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate polEtdStart;

    @Schema(description = "预计开航时间 End")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate polEtdEnd;

    @Schema(description = "router Id", example = "18841")
    private Long routeId;

    @Schema(description = "第一个liner段的POL设置为current pol")
    private String currentPort;

    @Schema(description = "订舱人代码")
    private String bookingParty;

    @Schema(description = "箱状态", example = "2")
    private String cntrStatus;

    @Schema(description = "箱主代码")
    private String cntrOwner;

    @Schema(description = "舱位代码")
    private String spaceOwner;

    @Schema(description = "约号")
    private String agreementNo;

    @Schema(description = "运输条款")
    private String shippingTerm;

    @Schema(description = "订舱号维度，0 审批通过后修改审批中 只有一个 不显示 （审批通过后，当前变为1)；1 有效  默认1 正常显示；-1 无效  旧审批通过变为-1，再审批不通过也改为-1 不显示；", example = "1")
    private Integer validStatus;

    @Schema(description = "订舱创建时间 start 网厅专用", example = "2025-08-30")
    private LocalDate createDateStart;

    @Schema(description = "订舱创建时间 end 网厅专用", example = "2025-08-30")
    private LocalDate createDateEnd;
}
